package com.service.impl;

import com.dao.CollectionDao;
import com.dto.excution.ListExcution;
import com.entity.AssociationInfo;
import com.service.CollectionService;
import com.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectionServiceImpl implements CollectionService {
    @Autowired
    private CollectionDao collectionDao;

    @Override
    public int collect(Integer stdUserId, Integer teaUserId,String statusType) {
        String uuid = UUIDUtil.get32UUID();
        return collectionDao.collect(uuid,stdUserId,teaUserId,statusType);
    }

    @Override
    public int findCollectionWhereId(Integer stdUserId, Integer teaUserId) {
        return collectionDao.findCollectionWhereId(stdUserId,teaUserId);
    }

    @Override
    public int findApplyWhereId(Integer stdUserId, Integer teaUserId) {
        return collectionDao.findApplyWhereId(stdUserId,teaUserId);
    }

    @Override
    public int findCollCount(Integer userId) {
        return collectionDao.findCollCount(userId);
    }

    @Override
    public int DeleteCollect(Integer id) {
        return collectionDao.DeleteCollect(id);
    }

    @Override
    public List<AssociationInfo> findCollect(Integer stdUserId , Integer type ,Integer limit) {
        return collectionDao.findCollect(stdUserId,type,limit);
    }

    @Override
    public List<AssociationInfo> findSQlist(Integer teaUserId, Integer limit) {
        return collectionDao.findSQlist(teaUserId,limit);
    }
}
